// 文章分类板块
const express = require('express')
const router = express.Router()
const expressJoi = require('@escook/express-joi')//表单格式验证模块
const router_hand = require('../router_handler/artcate') //导入路由处理函数

router.get('/cates', router_hand.cates) //获取文章


const { add_cate_schema } = require('../schema/user')
router.post('/addcates', expressJoi(add_cate_schema), router_hand.addcates) //新增文章分类

const { delete_cate_schema } = require('../schema/user')
router.get('/deletecate/:id', expressJoi(delete_cate_schema), router_hand.deletecate)// 删除

// const { delete_cate_schema } = require('../schema/user')
router.get('/getidcates/:id', expressJoi(delete_cate_schema), router_hand.getidcates)// id获取


router.post('/updatecate/', router_hand.updatecate)// id获取

module.exports = router
